package com.esri.core.renderer;

import com.esri.core.internal.util.d;
import com.esri.core.renderer.RampDefinition;
import java.io.IOException;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonNode;

/* loaded from: classes.dex */
public class AlgorithmicColorRamp extends ColorRamp {
    private RampDefinition a;

    public AlgorithmicColorRamp(int i, int i2, RampDefinition.Algorithm algorithm) {
        super("algorithmic");
        this.a = new RampDefinition(i, i2, algorithm);
    }

    public AlgorithmicColorRamp(RampDefinition rampDefinition) {
        super("algorithmic");
        this.a = rampDefinition;
    }

    public AlgorithmicColorRamp(JsonNode jsonNode) {
        super(jsonNode);
        this.a = new RampDefinition(d.b(jsonNode, "fromColor", 0), d.b(jsonNode, "toColor", 0), RampDefinition.Algorithm.fromString(d.a(jsonNode, "algorithm")));
    }

    public int getFromColor() {
        return this.a.getFromColor();
    }

    public void setFromColor(int i) {
        this.a.setFromColor(i);
    }

    public int getToColor() {
        return this.a.getToColor();
    }

    public void setToColor(int i) {
        this.a.setToColor(i);
    }

    public RampDefinition.Algorithm getAlgorithm() {
        return this.a.getAlgorithm();
    }

    public void setAlgorithm(RampDefinition.Algorithm algorithm) {
        this.a.setAlgorithm(algorithm);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // com.esri.core.renderer.ColorRamp
    public void toJson(JsonGenerator jsonGenerator) throws IOException, JsonGenerationException, Exception {
        super.toJson(jsonGenerator);
        this.a.toJson(jsonGenerator);
    }

    @Override // com.esri.core.renderer.ColorRamp
    public String toString() {
        return "AlgorithmicColorRamp [rampDefinition=" + this.a + "," + super.toString() + "]";
    }
}
